package game.saints;

/**
 *	@(#)Saint.java
 *
 *	The <code>Saint</code> class is the super class of the five saints.
 *
 *	@author Grzegorz Kobiela
 *	@version 1.0 2008/4/25
 */
public abstract class Saint
extends game.GameObject
{
	/** The saint type. */
	protected SaintType type;

	/**
	 *	Creates a new <code>Saint</code> instance.
	 *	@param type the saint type
	 */
	protected Saint(SaintType type) {
		this.type = type;
	}

	/**
	 *	Returns the saint type.
	 *	@return the saint type
	 */
	public SaintType getType() {
		return type;
	}

	/**
	 *	Returns the saint of the given type.
	 *	@param type the type
	 *	@return the saint
	 */
	public static Saint getSaint(SaintType type) {
		switch(type) {
			case BARBARA: return Barbara.getInstance();
			case CHRISTOFORI: return Christofori.getInstance();
			case GIORGIO: return Giorgio.getInstance();
			case MARIA: return Maria.getInstance();
			case NICOLO: return Nicolo.getInstance();
			default: return null;
		}
	}
}